Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — The PR changes the production file-comment lifecycle from local editor state to persisted composer state and adds nontrivial remap, deletion, and restoration synchronization. Although the focus and persistence intent is clear and tests cover the pure helpers, the broader state-flow change warrants human review. You can add or adjust custom eligibility rules. Learn more. |
54926bd to
0e2dcb0
Compare
There was a problem hiding this comment.
One concrete regression found in the draft/persisted annotation merge in FilePreviewPanel. Details inline.
Posted via Macroscope — UI Consistency
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 0e2dcb0. Configure here.

What Changed
Why
UI Changes
Old Caret/Focus:
Screen.Recording.2026-08-29.at.4.32.00.PM.mov
Fixed Caret/Focus:
Screen.Recording.2026-08-29.at.4.34.31.PM.mov
Old Comment file state:
Screen.Recording.2026-08-29.at.4.51.19.PM.mov
Fixed comment file state:
Screen.Recording.2026-08-29.at.5.14.13.PM.mov
Checklist
Note
Medium Risk
File comment state now flows through the composer draft store and Pierre remap sync, so incorrect add/remove/restore logic could lose or duplicate review comments.
Overview
Fixes inline file comments so the draft field focuses reliably in the Pierre editor, the caret stays visible, and submitted comments survive leaving and returning to a file tab—matching diff review behavior.
DiffCommentAnnotationadds optionalfocusOnMount(default on) and focuses the draft textarea in a layout effect viarequestAnimationFramewithpreventScroll, instead of relying onautoFocusalone. Draft styling now setscaret-foregroundso the cursor is visible on file surfaces.EditableFileSurfaceno longer keeps all annotations in local state. Persisted comments come from the composer draft store’sreviewComments(rebuilt withbuildFileCommentAnnotations); only the in-progress draft stays local. Pierre remap events sync the store throughresolveFileCommentAnnotationChanges, with a restorable-ID set so transient Pierre removals don’t drop comments incorrectly. Starting a comment blurs the editor and clears selections; submit/cancel flows write through the store.New helpers and tests live in
fileCommentAnnotations.tsandFilePreviewPanel.test.ts.Reviewed by Cursor Bugbot for commit ea19cf8. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix file inline comment focus and sync annotations to composer draft store
EditableFileSurfaceto source line comment annotations from persistedreviewCommentsin the composer draft store instead of local state; opening a comment creates a local draft, submitting persists aReviewComment, and removing an annotation removes it from the storebuildFileCommentAnnotations,appendFileCommentEntry, andresolveFileCommentAnnotationChangesutilities in fileCommentAnnotations.ts to derive renderable annotations from store state and detect added/removed comment IDs across rendersrestorableCommentIdsReffor same-session restorationDiffCommentAnnotationnow only programmatically focuses the textarea for draft comments on the next animation frame withpreventScroll, and focus can be disabled via the newfocusOnMountproplineAnnotationsstate or expectingautoFocuson all comment kinds will need to use the new store-backed flowMacroscope summarized ea19cf8.